package sk.stuba.fiit.clientApp.service;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.SignatureException;
import java.security.cert.X509Certificate;
import java.util.List;

public interface CryptographyService {


	public final static String SIGNATURE_ALGORITHM_RSA = "RSA";
	public final static String SIGNATURE_ALGORITHM_DSA = "DSA";
	
	public byte[] calculateSignatureFromHashData(String algorithm,PrivateKey privateKey,List<Object>data) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException;
	public boolean verifieSignature(String algorithm, X509Certificate certificate,List<Object>data, byte[] signatureValue) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException;
	public byte[] calculateHash(byte[] data,String algorithm) throws NoSuchAlgorithmException;
}
